package com.ericsson.nfc.signing;

import com.ericsson.nfc.signing.record.SignatureRecord;
import java.util.Vector;

//#ifdef MyJSR257
//# import my.javax.microedition.contactless.ndef.NDEFRecordType;
//#else
import javax.microedition.contactless.ndef.NDEFRecordType;
//#endif

class SignedRange {

    private Vector recordIndexes = new Vector();
    private SignatureRecord signatureRecord;
    private SignatureStatus status;
    private NDEFRecordType signatureRecordType;

    public int[] getRecordIndexes() {
        int[] res = new int[recordIndexes.size()];
        for (int i = 0; i < res.length; i++) {
            res[i] = ((Integer) recordIndexes.elementAt(i)).intValue();
        }
        return res;
    }
    
    public SignatureRecord getSignatureRecord() {
        return signatureRecord;
    }

    public SignatureStatus getStatus() {
        return status;
    }

    public void setSignatureRecord(SignatureRecord signatureRecord) {
        this.signatureRecord = signatureRecord;
    }

    public void setStatus(SignatureStatus status) {
        this.status = status;
    }

    void add(Integer index) {
        recordIndexes.addElement(index);
    }

    void setSignatureRecordType(NDEFRecordType recordType) {
        this.signatureRecordType = recordType;
    }

    public NDEFRecordType getSignatureRecordType() {
        return signatureRecordType;
    }
    
}
